#include<opencv2\opencv.hpp>
#include<iostream>
#include <chrono>
 
using namespace std;
using namespace cv;
 
int main() {
 
	Mat src0 = imread("912_5K_Arizona.png", 1);
	Mat dst0;
	double time0 = static_cast<double>(getTickCount());
	blur(src0, dst0, cv::Size(15, 15));
	//GaussianBlur(src0, dst0, cv::Size(3, 3), 1.5);
	time0 = ((double)getTickCount() - time0) / getTickFrequency();
	cout << "原始运行时间为：" << time0 << "秒" << endl;
	//imshow("src0", dst0);
 
	UMat src1;
	UMat dst1;
	src0.copyTo(src1);
	time0 = static_cast<double>(getTickCount());
	blur(src1, dst1, cv::Size(15, 15));
	//GaussianBlur(src1, dst1, cv::Size(3, 3), 1.5);
	time0 = ((double)getTickCount() - time0) / getTickFrequency();
	cout << "通过opengl的运行时间为：" << time0 << "秒" << endl;
	//imshow("dst1", dst1);
 
	waitKey(0);
	return 0;
}
